# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kdav
pkgver=20.04.3
pkgrel=0
pkgdesc="A DAV protocol implementation with KJobs"
url="https://kontact.kde.org/"
arch="all !armhf" # armhf blocked by qt5-qtdeclarativ
license="LGPL-2.0-or-later"
depends_dev="qt5-qtbase-dev qt5-qtxmlpatterns-dev kcoreaddons-dev kio-dev ki18n-dev"
makedepends="$depends_dev extra-cmake-modules"
subpackages="$pkgname-dev $pkgname-lang"
source="https://download.kde.org/stable/release-service/$pkgver/src/kdav-$pkgver.tar.xz"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="ba9f5dd26b60ce339aeeacd3777b70d490020a5a23179e71bfb7c54a4bdcaf6d940e68a44c2291b3ce06783b28edc5aa5e608a45561d18db2cdf72621f4a44ec  kdav-20.04.3.tar.xz"
